package adv7.bank2;

/**
 * @author oldliu
 * @since 1.0
 */
public class Account {
    //银行卡号和余额
    private String no;
    private int money;

    public Account(String no, int money) {
        this.money=money;
        this.no=no;
    }
    //取钱
    public void withdraw(int amount) {
        this.money-=amount;
    }

    //存钱
    public void deposit(int amount) {
        this.money+=amount;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }
}
